package com.solution.common.utils.httpsclient;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;

/**
 * 验证服务器证书和URL请求Hostname 是否一致
 * @author llp
 * @date 2017/5/6 11:33
 */
public class MyVerifyHostname implements HostnameVerifier {
	@Override
	public boolean verify(String hostname, SSLSession arg1) {
		if (hostname.equals("192.168.2.177") || hostname.endsWith("zhaiugo.com"))
			return true;
		else
			return false;
	}

}